package com.lzl.servicedriveruser.controller;


import com.lzl.dto.DriverUser;
import com.lzl.responese.ResponseResult;
import com.lzl.servicedriveruser.service.DriverUserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

import javax.xml.ws.Response;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lzl
 * @since 2022-08-30
 */
@RestController
public class DriverUserController {

    @Autowired
    DriverUserServiceImpl driverUserService;

    @PostMapping("/driver-user")
    public ResponseResult driverUser(@RequestBody DriverUser driverUser){
        return driverUserService.insertDriverUser(driverUser);
    }

    @PutMapping("/update-driver")
    public ResponseResult updateDriverUser(@RequestBody DriverUser driverUser){
        return driverUserService.updateDriverUser(driverUser);
    }

}
